<!-- <script type="text/javascript" src="/assets/common/plugins/kindeditor/NKeditor-all-min.js"></script>
<script type="text/javascript" src="/assets/common/plugins/kindeditor/libs/JDialog/JDialog.min.js"></script>
<link rel="stylesheet" href="/assets/common/plugins/wangEditor/css/wangEditor.min.css">
<script type="text/javascript" src="/assets/common/plugins/wangEditor/js/wangEditor.min.js"></script> -->
<script src="/assets/common/plugins/ueditor/ueditor.config.js" type="text/javascript"></script>
<script src="/assets/common/plugins/ueditor/ueditor.all.min.js" type="text/javascript"></script>
<div class="row-content am-cf">
    <div class="row">
        <div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
            <div class="widget am-cf">
                <form id="my-form" class="am-form tpl-form-line-form" method="post" enctype="multipart/form-data">
                    <div class="widget-body">
                        <fieldset>
                            <div class="widget-head am-cf">
                                <div class="widget-title am-fl">基本信息</div>
                            </div>
                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">标题 </label>
                                <div class="am-u-sm-9 am-u-end">
                                    <input type="text" class="tpl-form-input" name="video[video_title]"
                                           value="" required>
                                </div>
                            </div>
                            
                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">封面 </label>
                                <div class="am-u-sm-9 am-u-end">
                                    <div class="am-form-file">
                                        <div class="am-form-file">
                                            <button type="button"
                                                    class="upload-file am-btn am-btn-secondary am-radius">
                                                <i class="am-icon-cloud-upload"></i> 选择图片
                                            </button>
                                            <div class="uploader-list am-cf">
                                            </div>
                                        </div>
                                        <div class="help-block am-margin-top-sm">
                                            <small>2:1的图像比例即可，大小2M以下 (可拖拽图片调整显示顺序 )</small>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            
                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-u-lg-2 am-form-label">视频链接</label>
                                <div class="am-u-sm-9 am-u-end">
                                    <input type="text" class="tpl-form-input" name="video[video_url]"
                                           value="" placeholder="请输入视频链接">
                                </div>
                            </div>

                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-u-lg-2 am-form-label">上传视频</label>
                                <div class="am-u-sm-9 am-u-end">
                                    <input type="file" name="video_file" accept="video/*" class="tpl-form-input">
                                    <small>支持上传的视频格式：mp4、avi 等，文件大小不超过 50MB。</small>
                                </div>
                            </div>
                            <div class="am-form-group am-padding-top">
                                <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">内容 </label>
                                <div class="am-u-sm-9 am-u-end">
                                    <!-- <textarea id="container" name="article[article_content]"
                                              type="text/plain"></textarea>  -->
                                              <textarea name="video[content]" class="content" id="content"></textarea>
                                </div>
                            </div>
                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-u-lg-2 am-form-label">播放量</label>
                                <div class="am-u-sm-9 am-u-end">
                                    <input type="number" class="tpl-form-input" name="video[video_num]"
                                           value="0">
                                </div>
                            </div>
                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">排序 </label>
                                <div class="am-u-sm-9 am-u-end">
                                    <input type="number" class="tpl-form-input" name="video[video_sort]"
                                           value="100" required>
                                    <small>数字越小越靠前</small>
                                </div>
                            </div>
                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">视频状态 </label>
                                <div class="am-u-sm-9 am-u-end">
                                    <label class="am-radio-inline">
                                        <input type="radio" name="video[video_status]" value="1" data-am-ucheck
                                               checked>
                                        显示
                                    </label>
                                    <label class="am-radio-inline">
                                        <input type="radio" name="video[video_status]" value="0" data-am-ucheck>
                                        隐藏
                                    </label>
                                </div>
                            </div>
                            <!-- 表单提交按钮 -->
                            <div class="am-form-group">
                                <div class="am-u-sm-9 am-u-sm-push-3 am-margin-top-lg">
                                    <button type="submit" class="j-submit am-btn am-btn-secondary">提交
                                    </button>
                                </div>
                            </div>

                        </fieldset>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>

<!-- 图片文件列表模板 -->
{{include file="layouts/_template/tpl_file_item" /}}

<!-- 文件库弹窗 -->
{{include file="layouts/_template/file_library" /}}

<script src="assets/common/js/vue.min.js"></script>
<script src="assets/common/js/ddsort.js"></script>
<script src="assets/common/plugins/umeditor/umeditor.config.js?v=<?= $version ?>"></script>
<script src="assets/common/plugins/umeditor/umeditor.min.js"></script>
<script src="assets/store/js/goods.spec.js?v=<?= $version ?>"></script>
<script>

    $(function () {
        var editor = new UE.ui.Editor();
        editor.render("content"); 
        // 选择图片
        $('.upload-file').selectImages({
            name: 'video[video_img]'
            , multiple: false
        });

        $('#my-form').superForm();

    });
</script>
